package com.idak.rdv.dao.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.Logger;

public final class RdvUtils {
	private static final Logger LOGGER = Logger.getLogger(RdvUtils.class); 
	
	private RdvUtils(){}
	
	public static String dateToString(Date date){
		String result = null;
		
		return result;
	}
	
	public static Date stringToDate(String date, String format){
		Date result = null;
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		try {
			result = sdf.parse(date);
		} catch (ParseException e) {
			LOGGER.error("Format de date ("+format+") est incorrect");
		}
		return result;
	}
}
